<template>
  <div>我是父亲</div>
  <BigChild
    :msg="msgBigChild"
    thing="锤子"
    @get="handleGet"
    @toSmall="handleToSmall"
  />
  <SmallChild :msg="toSmallMsg" />
  <button @click="handleClick">改口</button>
</template>
<script setup>
import { ref } from "vue";
import BigChild from "./components/大儿子.vue";
import SmallChild from "./components/小儿子.vue";
const msgBigChild = ref("父亲给大儿子的消息");
const toSmallMsg = ref("");
const handleClick = () => {
  msgBigChild.value = "不传了";
};
const handleGet = (message) => {
  console.log(message);
};
const handleToSmall = (msg) => {
  console.log(msg);
  toSmallMsg.value = msg;
};
</script>
<style></style>
